package com.ohs.controller;

import com.ohs.pojo.User;
import com.ohs.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {

    @Autowired
    private IUserService iUserService;

    @GetMapping("/t")
    @ResponseBody
    public String t(){
        return "t";
    }

    //测试
    @RequestMapping("/t1")
    @ResponseBody
    public User t1(){
        return this.iUserService.findOne();
    }
}
